<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // 1.includes判断某个字符是否在字符串里
        // let arr = "abcderg"
        // console.log(arr.includes('a'))
        // 2.repeat可以重复某个字符
        // let str = "*"
        // console.log(str.repeat(5))
        // 3.padStart(), padEnd() 根据给的位数补全字符串
        // let str = "abc"
        // let res = str.padStart(6, "$")
        // console.log(res)
        // let res = str.padEnd(6, "$")
        // console.log(res)
        // 4.startsWith endsWidth
        // let str = "hellow, world"
        // console.log(str.startsWith('hello'))
        // console.log(str.endsWith('rld'))

    </script>
</body>
</html>